<?php
namespace Application\Api\Controller;

class Banner extends Base
{

    private function getService()
    {
        return $this->get(SERVICE_BANNER);
    }

    /*
        /Api/Banner/getList
    */
    public function getListAction()
    {
        $data = $this->getRequestData();
        $temp = $this->getService()->getList($data['position']);
        $list = $this->get(SERVICE_FILE)->getFileData($temp['list'], ['dry_image' => 1]);
        $send = [
            'oss_domain' => getOssDomain(),
            'list' => $list
        ];
        $this->sendSuccess($send);
    }

}